from django.urls import path
from .views import *

urlpatterns = [
    # 环境相关接口地址
    path(
        "envInfo/", EnvInfoView.as_view({"get": "list", "post": "add", })
    ),
    path("envInfo/update/",EnvInfoView.as_view({"post":"update"})),
    path(
        "envInfo/page/", EnvInfoView.as_view({"get": "page"})
    ),
    path("envInfo/delete/<int:pk>/", EnvInfoView.as_view({"delete": "delete", })),
    # 环境参数相关接口
    path("envParams/", EnvParamsView.as_view({"get": "list", "post": "add", })),
    path("envParams/update/", EnvParamsView.as_view({"post": "update"})),
    path("envParams/page/", EnvParamsView.as_view({"get": "page"})),
    path("envParams/delete/<int:pk>/", EnvParamsView.as_view({"delete": "delete", })),

    # 数据库连接相关接口
    path("dbConnection/", DBConnectionView.as_view({"get": "list", "post": "add"})),
    path("dbConnection/update/", DBConnectionView.as_view({"post": "update"})),
    path("dbConnection/page/", DBConnectionView.as_view({"get": "page", })),
    path("dbConnection/delete/<int:pk>/", DBConnectionView.as_view({"delete": "delete", })),

]
